package edu.sjb.map;

import java.util.Hashtable;

import edu.sjb.characters.GameCharacter;
import edu.sjb.characters.Goomba;
import edu.sjb.characters.Koopa;

public class EntityCharacter {
	protected Hashtable<Character, GameCharacter> characters;
	protected Hashtable<Character, MapObject> entities;

	public EntityCharacter() {
		characters = new Hashtable<Character, GameCharacter>();
		entities = new Hashtable<Character, MapObject>();
		generate();
	}

	private void generate() {
		GameCharacter p = null;
		MapObject o = null;

		Character B = new Character('B');
		o = new MapBrick();
		entities.put(B, o);

		Character I = new Character('I');
		o = new PrizeMapBrick();
		entities.put(I, o);

		Character P = new Character('P');
		o = new BottomlessPit();
		entities.put(P, o);

		Character T = new Character('T');
		o = new Pipe();
		entities.put(T, o);

		Character G = new Character('G');
		p = new Goomba();
		characters.put(G, p);

		Character K = new Character('K');
		p = new Koopa();
		characters.put(K, p);
	}

	public GameCharacter getCharacter(Character key) {
		return characters.get(key);
	}

	public MapObject getEntity(Character key) {
		return entities.get(key);
	}
}